import { $t } from "@/plugins/i18n";
const { VITE_HIDE_HOME } = import.meta.env;

export default [
  {
    path: "/home",
    meta: {
      title: $t("menus.pureHome"),
      showLink: false
    },
    redirect: "/home/index",
    children: [
      {
        path: "/home/index",
        name: "HomeIndex",
        // component: () => import("@/views/welcome/index.vue"),
        component: () => import("@/views/home/index.vue"),
        meta: {
          title: $t("menus.pureHome"),
          showLink: VITE_HIDE_HOME === "true" ? false : true
        }
      }
    ]
  },
  {
    path: "/report",
    meta: {
      title: $t("menus.report"),
      showLink: true,
      rank: 102
    },
    redirect: "/report/index",
    children: [
      {
        path: "/report/index",
        name: "reportIndex",
        meta: {
          title: $t("menus.report"),
          showLink: false
        },
        component: () => import("@/views/report/index.vue")
      },
      {
        path: "/report/detail",
        name: "reportDetail",
        meta: {
          title: $t("menus.reportDetail"),
          showLink: false
        },
        component: () => import("@/views/report/detail.vue")
      },
      {
        path: "/report/family",
        name: "reportFamily",
        meta: {
          title: $t("menus.reportFamily"),
          showLink: false
        },
        component: () => import("@/views/report/family.vue")
      }
    ]
  },
  {
    path: "/knowledge",
    meta: {
      title: $t("menus.knowledge"),
      showLink: true,
      rank: 103
    },
    redirect: "/knowledge/index",
    children: [
      {
        path: "/knowledge/index",
        name: "KnowledgeIndex",
        meta: {
          title: $t("menus.knowledge"),
          showLink: false
        },
        component: () => import("@/views/knowledge/index.vue")
      },
      {
        path: "/knowledge/document",
        name: "DocumentViewer",
        meta: {
          title: $t("menus.documentViewer"),
          showLink: false
        },
        component: () => import("@/views/knowledge/document.vue")
      }
    ]
  },
  {
    path: "/healthBlock",
    meta: {
      title: $t("menus.healthBlock"),
      showLink: true,
      rank: 103.5
    },
    redirect: "/healthBlock/index",
    children: [
      {
        path: "/healthBlock/index",
        name: "HealthBlockIndex",
        meta: {
          title: $t("menus.healthBlock"),
          showLink: false
        },
        component: () => import("@/views/healthBlock/index.vue")
      }
    ]
  },
  {
    path: "/healthRecords",
    meta: {
      title: $t("menus.healthRecords"),
      showLink: true,
      rank: 104
    },
    redirect: "/healthRecords/index",
    children: [
      {
        path: "/healthRecords/index",
        name: "HealthRecordsIndex",
        meta: {
          title: $t("menus.healthRecords"),
          showLink: false
        },
        component: () => import("@/views/healthRecords/index.vue")
      },
      {
        path: "/healthRecords/detail",
        name: "HealthRecordsDetail",
        meta: {
          title: $t("menus.healthRecordsDetail"),
          showLink: false
        },
        component: () => import("@/views/healthRecords/detail.vue")
      },
      {
        path: "/healthRecords/createRecord",
        name: "CreatHealthRecords",
        meta: {
          title: $t("menus.createHealthRecords"),
          showLink: false
        },
        component: () => import("@/views/healthRecords/createRecord.vue")
      },
      {
        path: "/healthRecords/advice",
        name: "HealthRecordsAdvice",
        meta: {
          title: $t("menus.healthAdvice"),
          showLink: false
        },
        component: () => import("@/views/healthRecords/advice.vue")
      },
      {
        path: "/healthRecords/riskAssessment",
        name: "HealthRecordsRiskAssessment",
        meta: {
          title: $t("menus.riskAssessment"),
          showLink: false
        },
        component: () => import("@/views/healthRecords/riskAssessment.vue")
      }
    ]
  },
  {
    path: "/followUpPlan",
    meta: {
      title: $t("menus.followUpPlan"),
      showLink: true,
      rank: 104
    },
    redirect: "/followUpPlan/index",
    children: [
      {
        path: "/followUpPlan/index",
        name: "FollowUpPlanIndex",
        meta: {
          title: $t("menus.followUpPlan"),
          showLink: false
        },
        component: () => import("@/views/followUpPlan/index.vue")
      },
      {
        path: "/followUpPlan/detail",
        name: "FollowUpPlanDetail",
        meta: {
          title: $t("menus.followUpPlanDetail"),
          showLink: false
        },
        component: () => import("@/views/followUpPlan/detail.vue")
      }
    ]
  },
  {
    path: "/sensitiveDisease",
    meta: {
      title: $t("menus.sensitiveDisease"),
      showLink: true,
      rank: 104
    },
    redirect: "/sensitiveDisease/index",
    children: [
      {
        path: "/sensitiveDisease/index",
        name: "SensitiveDiseaseIndex",
        meta: {
          title: $t("menus.sensitiveDisease"),
          showLink: false
        },
        component: () => import("@/views/sensitiveDisease/index.vue")
      }
    ]
  },

  {
    path: "/userList",
    meta: {
      title: $t("menus.userList"),
      showLink: true,
      rank: 106
    },
    redirect: "/userList/index",
    children: [
      {
        path: "/userList/index",
        name: "UserListIndex",
        meta: {
          title: $t("menus.userList"),
          showLink: false
        },
        component: () => import("@/views/userList/index.vue")
      }
    ]
  },
  {
    path: "/addReport",
    meta: {
      title: $t("menus.addReportMenu"),
      showLink: true,
      rank: 107
    },
    redirect: "/addReport/index",
    children: [
      {
        path: "/addReport/index",
        name: "AddReportIndex",
        meta: {
          title: $t("menus.addReport"),
          showLink: false
        },
        component: () => import("@/views/addReport/index.vue")
      }
    ]
  },
  {
    path: "/aiPage",
    meta: {
      title: $t("menus.aiPage"),
      showLink: true,
      rank: 108
    },
    redirect: "/aiPage/index",
    children: [
      {
        path: "/aiPage/index",
        name: "AiPageIndex",
        meta: {
          title: $t("menus.aiPage"),
          showLink: false
        },
        component: () => import("@/views/aiPage/index.vue")
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
